package cn.tedu.submarine;


import javax.swing.*;

/**
 * 炸弹
 */
public class Bomb extends SeaObject{
    public Bomb(int x,int y) {
        super(9,12,x,y,3);
    }

    @Override
    public void move() {
        y += speed;
    }

    @Override
    public ImageIcon getImage() {
        return Images.bomb;
    }

    /**
     * 检测炸弹是否越界
     * @return 越界则ture，没越界则false
     */
    @Override
    public boolean isOutOfBounds(){
        return this.y >= World.HEIGHT;
    }

}
